import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 斐波拉契数列
 * User: 15085202591
 * Date: 2022-11-01
 * Time: 20:44
 */
public class FibonacciList {
    public static int Fibonacci(int x){
       if (x < 1){
           return 0;
       }else if (x==1 || x==2){
           return 1;
       }
       int a = 1;
       int b = 1;
       int c = 0;
        for (int i = 3; i <= x; i++) {
            c = a;
            a = a + b;
            b = c;
        }
        return a;
    }
    public static int Fibonacci2(int x){
        if(x < 1){
            return 0;
        }else if(x == 1 || x == 2){
            return 1;
        }else {
            return Fibonacci2(x-2) + Fibonacci2(x-1);
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            System.out.print(Fibonacci(i) + " ");
        }
        System.out.println();
        for (int i = 0; i <n ; i++) {
            System.out.print(Fibonacci2(i) + " ");
        }
        sc.close();
    }
}
